package com.bawei.a2209_mianshi.mmkv

import com.bawei.a2209_mianshi.mmkv.utils.MMKVNullableProperty
import com.bawei.a2209_mianshi.mmkv.utils.MMKVOwner
import com.bawei.a2209_mianshi.mmkv.utils.MMKVProperty
import com.bawei.a2209_mianshi.ui.login.model.UserInfo
import com.tencent.mmkv.MMKV

/**
 * @author yaotianxue
 * @description 用户信息相关存储
 * @date 2025/5/13
 */
object UserMMKV: MMKVOwner {
    //  MMKV实例 user文件中
    override val mmkv: MMKV
        get() = MMKV.mmkvWithID("user")

    //是否绑定车辆
    var hasBindVehicle by MMKVProperty(false)
    var hasBindDevice by MMKVProperty(false)

    //用户信息
    var userInfo by MMKVNullableProperty(UserInfo::class.java)

}